Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support option starts with + #261

Merged
merged 4 commits into from
Nov 10, 2023
Merged

feat: support option starts with + #261

merged 4 commits into from
Nov 10, 2023

Conversation

sigoden
Copy link
Owner

@sigoden sigoden commented Nov 10, 2023

# @option     +oa                   
# @option +b  +ob                   short
# @option +c                        short only
# @option     +oc!                  required
# @option     +od*                  multi-occurs
# @option     +oe+                  required + multi-occurs
# @option     +ona <PATH>           value notation
# @option     +onb <CMD> <FILE>     two-args value notations
# @option     +onc <CMD> <FILE+>    unlimited-args value notations
# @option     +oda=a                default
# @option     +odb=`_default_fn`    default from fn
# @option     +oca[a|b]             choice
# @option     +ocb[=a|b]            choice + default
# @option     +occ*[a|b]            multi-occurs + choice
# @option     +ocd+[a|b]            required + multi-occurs + choice
# @option     +ofa[`_choice_fn`]    choice from fn
# @option     +ofb[?`_choice_fn`]   choice from fn + no validation
# @option     +ofc*[`_choice_fn`]   multi-occurs + choice from fn
# @option     +oxa~                 capture all remaining args

Mix -/+ option

# @option +b  -ob
# @option +c --oc
# @option -d  +od

@sigoden sigoden marked this pull request as draft November 10, 2023 00:07
@sigoden sigoden marked this pull request as ready for review November 10, 2023 03:31
@sigoden sigoden merged commit 95c6259 into main Nov 10, 2023
3 checks passed
@sigoden sigoden deleted the feat-plus-sign branch November 10, 2023 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant